package factory.one.entity;

import java.util.Date;

//发货
public class Deliver {

    private Long id;
    private Long orderId; //订单ID
    private Integer sequence; //发送批次
    private Integer number; //发送总件数
    private String createUser; //创建用户
    private Date createTime; //创建时间
    private Integer status; //1-新建(装载中) 2-已发货 3-取消发货

    public static final String CREATE_SQL = "    create table DELIVER (\n" +
            "        ID bigint not null GENERATED ALWAYS AS IDENTITY,\n" +
            "        ORDER_ID bigint not null,\n" +
            "        SEQUENCE int not null,\n"+
            "        NUMBER int not null,\n"+
            "        CREATE_USER varchar(32) not null,\n" +
            "        CREATE_TIME timestamp not null,\n" +
            "        STATUS int not null,\n"+
            "        primary key (ID)\n" +
            "    )";

    public static final String INDEX1_SQL = "CREATE INDEX idx_order on DELIVER (ORDER_ID)";

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Integer getSequence() {
        return sequence;
    }

    public void setSequence(Integer sequence) {
        this.sequence = sequence;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public String getCreateUser() {
        return createUser;
    }

    public void setCreateUser(String createUser) {
        this.createUser = createUser;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
}
